package com.zty.user.designPattern.abstractFactoryPattern.easy;

import com.zty.user.designPattern.factoryPattern.easy.Shape;

/**
 * @Author ZTY
 * @Description 对所有的形状做一个统一管理
 * @Date 2:32 2023-12-15
 **/

public class ColorFactory extends AbstractFactory {

    @Override
    public Shape getShape(String shape) {
        return null;
    }

    @Override
    public Color getColor(String colorType) {
        if (colorType == null) {
            return null;
        }
        if (colorType.equalsIgnoreCase("BLUE")) {
            return new Blue();
        } else if (colorType.equalsIgnoreCase("RED")) {
            return new Red();
        }
        return null;
    }

}
